<?php
// Copyright 2011 Toby Zerner, Simon Zerner
// This file is part of esoTalk. Please see the included license file for usage information.

if (!defined("IN_ESOTALK")) exit;

/**
 * Displays a single post.
 *
 * @package esoTalk
 */

$post = $data["post"];
?>

<div class='post hasControls <?php echo implode(" ", (array)$post["class"]); ?>' id='<?php echo $post["id"]; ?>' <?php
																													if (!empty($post["data"])) :
																														foreach ((array)$post["data"] as $dk => $dv)
																															echo " data-$dk='$dv'";
																													endif; ?>>

	<?php if (!empty($post["avatar"])) : ?>
		<div class='avatar' <?php if (!empty($post["hideAvatar"])) : ?> style='display:none' <?php endif; ?>><?php echo $post["avatar"]; ?></div>
	<?php endif; ?>

	<div class=''>
<!-- 
		<div class='postHeader'>
			<div class='info'>
				<h3><?php echo $post["title"]; ?></h3>
				<?php if (!empty($post["info"])) foreach ((array)$post["info"] as $info) echo $info, "\n"; ?>
			</div>
			<div class='controls'>
				<?php if (!empty($post["controls"])) foreach ((array)$post["controls"] as $control) echo $control, "\n"; ?>
			</div>
		</div> -->
		<!-- 
		<?php if (!empty($post["body"])) : ?>
					<div class='postBody'>
						<?php echo $post["body"]; ?>
					</div>
		<?php endif; ?> -->
		<!-- 加载编辑器的容器 -->
		<script id="container" name="content" type="text/plain">
			
		</script>
		<!-- 配置文件 -->
		<script type="text/javascript" src="../../ueditor/ueditor.config.js"></script>
		<!-- 编辑器源码文件 -->
		<script type="text/javascript" src="../../ueditor/ueditor.all.js"></script>
		<!-- 实例化编辑器 -->
		<script type="text/javascript">
			var ue = UE.getEditor('container');
		</script>

		<div class="editButtons">
			<input type="submit" name="postReply" value="发布" class="big submit  button " tabindex="300">
		</div>
		<!-- <?php if (!empty($post["footer"])) : ?>
				<div class='postFooter'>
					<?php foreach ((array)$post["footer"] as $footer) echo $footer, "\n"; ?>
				</div>
		<?php endif; ?> -->

	</div>

</div>